$(function(){
	
	//判断是否有错误信息
	if($("#errorMsg").val() == 'wrong_pwd'){
		alert("账号或密码错误！");
	}
	
});


/**
 * @Title: getVerify
 * @Description: 获取验证码
 * @author fengshuonan
 */
function getVerify()
{
	var tellphone = $("#tellphone").val();
	
	$.ajax({
        type: "GET",
        url: "manageCoupon!getVerifyCode.action",
        data: {
        	'tellphone':tellphone
        },
        dataType: "json",
        success: function(data){
        	alert(data);
        }
    });
}


/**
 * @Title: testCode
 * @Description: 验证验证码是否正确
 * @author fengshuonan
 */
function testCode()
{
	var tellphone = $("#tellphone").val();
	var verifyCode = $("#verifyCode").val();
	
	window.location.href = "manageCoupon!verifyCode.action?tellphone=" + tellphone + "&verifyCode=" + verifyCode;
}

/**
 * @Title: updatePassword
 * @Description: 修改密码
 * @author YHQ
 */
function updatePassword(){
	
	var pwd = $("#pwd").val();
	var rePwd = $("#rePwd").val();
	
	if(pwd != rePwd){
		alert("两次密码输入不一致");
		return false;
	}
	
	return true;
}
